﻿@model Dictionary<int, string>

@functions{
    string WorkflowTransitionName(int transitionId)
    {
        return string.Format("Workflow-{0}", transitionId);
    }
    string WorkflowTypeClass(bool isLatest)
    {
        return string.Format("cms-js-workflow-button-{0}", isLatest ? "reject" : "approve");    
    }
}

@if (Model.Any())
{
    int count = Model.Count;
    int index = 1;
    foreach (var item in Model)
    {
        <input class="b-button b-button_small @WorkflowTypeClass(index == count)" type="submit" value="@item.Value" id="@WorkflowTransitionName(item.Key)" />
        index++;
    }
}